package com.codinghero.zqlb.spider.handler;

import java.util.List;

import com.codinghero.sql.MySQLOper;
import com.codinghero.zqlb.Constant;
import com.codinghero.zqlb.match.SoccerMatch;

@Deprecated
public class BatchPassMatchHandler implements MatchHandler {

	public <T extends SoccerMatch> void handle(List<T> list) {
		MySQLOper dbOper = new MySQLOper(Constant.JDBC_URL, Constant.USER_ID,
				Constant.PASSWORD);
		try {
			dbOper.connect();
			dbOper.startTransaction();
			dbOper.executeUpdate("UPDATE zqlb_soccer_match m SET m.status=1 WHERE m.status=0");
			dbOper.commit();
		} catch (Exception e) {
			dbOper.rollback();
			e.printStackTrace();
		} finally {
			dbOper.close();
		}
	}

}
